"""
练习6
"""


def leap_year(year):
    """
    计算某年是否是闰年
    :param year: int the year
    :return: boolean is leap year
    """
    if year % 400 == 0:
        return True
    elif year % 100 == 0:
        return False
    elif year % 4 == 0:
        return True
    else:
        return False
